import request from '@/utils/request'

/**
 * 获取所有精选题库
 * @returns
 */
export const getAllChoiceAPI = (params) => {
  return request({
    method: 'get',
    url: '/questions/choice',
    params
  })
}

/**
 * 试题审核
 */
export const updateQuesStateAPI = (data) => {
  return request({
    method: 'post',
    url: `/questions/check/${data.id}`,
    data
  })
}

/**
 * 精选试题上架下架
 */
export const aboveQuestionAPI = (id, publishState) => {
  return request({
    method: 'post',
    url: `/questions/choice/${id}/${publishState}`
  })
}
